import xlrd


class ExcelOp:
    def __init__(self,path='../../config/AutoCase.xls'):
        with xlrd.open_workbook(path) as workbook:
            self.workbook = workbook

    def get_sheet(self,sheet_name):
        self.data = self.workbook.sheet_by_name(sheet_name)

    def get_row(self):
        return self.data.nrows
    def get_col(self):
        return self.data.ncols
    def get_cell(self,row,col):
        return self.data.cell_value(row,col)